package com.myoffice.model;

import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * TUserstate entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "T_USERSTATE", schema = "OA")
public class TUserstate implements java.io.Serializable {

	// Fields

	private String id;
	private String name;
	private Set<TUserinfo> TUserinfos = new HashSet<TUserinfo>(0);

	// Constructors

	/** default constructor */
	public TUserstate() {
	}

	/** minimal constructor */
	public TUserstate(String id, String name) {
		this.id = id;
		this.name = name;
	}

	/** full constructor */
	public TUserstate(String id, String name, Set<TUserinfo> TUserinfos) {
		this.id = id;
		this.name = name;
		this.TUserinfos = TUserinfos;
	}

	// Property accessors
	@Id
	@Column(name = "ID", unique = true, nullable = false)
	public String getId() {
		return this.id;
	}

	public void setId(String id) {
		this.id = id;
	}

	@Column(name = "NAME", nullable = false)
	public String getName() {
		return this.name;
	}

	public void setName(String name) {
		this.name = name;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "TUserstate")
	public Set<TUserinfo> getTUserinfos() {
		return this.TUserinfos;
	}

	public void setTUserinfos(Set<TUserinfo> TUserinfos) {
		this.TUserinfos = TUserinfos;
	}

}